<template>
	<uni-nav-bar v-if="!isShare" fixed="true" statusBar="true" border="false" left-icon="left" title="友步领队" @clickLeft="back"></uni-nav-bar>
	<uni-nav-bar v-if="isShare" fixed="true" statusBar="true" border="false" left-icon="home" title="友步领队" @clickLeft="backHome"></uni-nav-bar>
	<view class="container">
		<view class="uni-padding-wrap bg-white boxsiz ac">
			<view class="uni-flex w100">
				<view class="avatar">
					<image mode="aspectFill" :src="leaderUserInfo.headerPic || 'https://green-leader.oss-cn-hangzhou.aliyuncs.com/common/%E5%8F%8B%E6%AD%A5%E9%A2%86%E9%98%9Flogo.png'"></image>
				</view>
				<view class="flex1 mb15">
					<view class="uni-flex sp_betw ac mb40">
						<view class="font_size_36 b-font">
							<text class="mr15 gender">{{leaderUserInfo.nickName || '友步领队'}}<text class="gender-icon color-blue b-font" v-if="leaderUserInfo.sex === 0">♂</text>
							<text class="gender-icon color-red b-font" v-if="leaderUserInfo.sex === 1">♀</text></text>
						</view>
						<button open-type="share" class="font_size_24 sign-status uni-success">分享主页</button>
					</view>
					<view class="uni-flex">
						<view class="mb30 mr50">
							<text class="mr20">带队</text><text>{{leaderUserInfo.leaderCount}}次</text>
						</view>
						<view class="mb30">
							<text class="mr20">评分</text><text>{{leaderUserInfo.recommendScore}}分</text>
						</view>
					</view>
				</view>
			</view>
			<view class="boxsiz w100">
				<view class="mb20">签名</view>
				<view class="pb40">{{leaderUserInfo.signature || '这是签名这是签名这是签名这是签名这是签名这是签名 签名这是签名这是签名这是签名这是签名这是签名这是签名这是签名这是签名这是签名'}}</view>
			</view>
		</view>
		<view class="tab mb40">
			<text :class="navIndex==0?'mr100 active':'mr100'" @click="checkIndex(0)">领队行程</text><text :class="navIndex==1?'active':''" @click="checkIndex(1)">照片墙</text>
		</view>
		<scroll-view scroll-y="true" scroll-x="false" :style="{height:scrollH+'px'}" refresher-enabled="true" :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh" @scrolltolower="onLoadMore">
			<!-- 内容切换 -->
			<view class="content" v-if="navIndex==0">
			<view class="uni-padding-wrap">
				<view class="foot-list uni-flex uni-row" v-if="List.length>0">
					<view class="foot-card m5" v-for="item in List" @tap="navgetTo('pages/schdule/schdule_detail',item.id,'')">
						<img class="foot-avatar" :src="item.coverUrl" mode=""></img>
						<view class="p510">
							<text class="foot-name">{{item.itineraryTitle}}</text>
							<view class="uni-flex">
								<text class="sign-num">已报{{item.memberCount}}/{{item.userLimit}}</text>
								<view class="sign-price-list"><text class="sign-price">{{item.itineraryFee}}</text>元/人</view>
							</view>
							<view class="sign-time">
								<text>{{item.collectDate}}集合</text>
							</view>
						</view>	
					</view>
				</view>
			</view>
			</view>
			<!-- 内容切换 -->
			<view class="content" v-if="navIndex==1">
			<view class="vt50 tc" v-if="List.length == 0">
					<view>暂无数据！</view>
				</view>
			</view>
		<!-- 加载提示 -->
		<view v-if="isLoading" class="tc mt100 mb100">{{loadMoreText}}</view>
		</scroll-view>
	</view>


</template>

<script>
	import api from '@/common/api/webapi.js'; /*api*/
	import storageUtil from '@/common/util/storageUtil.js';
	export default {
		components: {

		},
		onShow() {
			console.log('onShow: 页面显示');
			// 检查分享页面数据状态
			const isShare = this.isShare || getApp().globalData.isSharePage;
			const storedSchduleId = storageUtil.getStorageData('schduleId');
			const storedLeaderUserId = storageUtil.getStorageData('LeaderUserId');
			const storedMemberAccount = storageUtil.getUserData('memberAccount');
			console.log('onShow: 检查数据状态', {isShare, storedSchduleId, storedLeaderUserId, storedMemberAccount});
			
			// 如果是分享页面，确保参数完整
			if (isShare) {
				// 同步本地存储的参数到当前页面数据
				if (storedSchduleId) this.schduleId = storedSchduleId;
				if (storedLeaderUserId) this.LeaderUserId = storedLeaderUserId;
				if (storedMemberAccount) this.memberAccount = storedMemberAccount;
				
				// 如果数据不完整，重新加载
				if (!this.leaderUserInfo || !this.leaderUserInfo.id || this.List.length === 0) {
					console.log('onShow: 数据不完整，重新加载数据');
					// 优先使用当前保存的LeaderUserId，其次使用本地存储的
					const leaderUserIdToUse = this.LeaderUserId || storedLeaderUserId;
					if (leaderUserIdToUse) {
						console.log('onShow: 使用LeaderUserId重新加载数据', leaderUserIdToUse);
						this.GetDetailInfo(leaderUserIdToUse);
					} else {
						console.error('onShow: 无法获取有效的LeaderUserId');
					}
				} else {
					console.log('onShow: 数据完整，无需重新加载');
				}
			}
		},
		data() {
			return {
				navTop: 40,
				userLoginFlag: false,
				isShare:false,
				travelInternanyId:'',
				schduleId:'', // 明确声明schduleId参数
				LeaderUserId:'', // 明确声明LeaderUserId参数
				memberAccount:'', // 明确声明memberAccount参数
				navIndex:0,
				leftIcon:'left',
				leaderUserInfo: {},
				Data:{},
				scrollH:0,
				isRefreshing:false,
				isLoading:false,
				loadMoreText:"加载中...",
				List:[],
				param: {
					page: 1, //当前页
					limit: 10, //每页显示记录数
					PageCount: 0,
				},
			}
		},
		onReady() {
			// 获取可滚动区域的高度：视口高度 - tabbar切换卡高度就是剩余的内容可滚动的。
			//如果你使用取消了原生导航栏，记着把你自定义导航栏的高度也减掉哦
			uni.getSystemInfo({
				success: (res) => {
					this.scrollH = res.windowHeight - 300 - uni.upx2px(100)
				}
			})
		},
		onLoad(option) {
			const app = getApp()
			this.navTop = app.globalData.navTop;
			console.log("onLoad: 页面加载参数", option);
			// 初始化页面高度
			this.scrollH = app.globalData.windowHeight - 200;
			
			// 获取URL参数或本地存储参数
			const isShare = option && option.share === 'true';
			this.isShare = isShare;
			// 设置全局分享页面标记
			getApp().globalData.isSharePage = isShare;
			console.log("onLoad: 是否分享页面", isShare);
			
			// 获取并保存LeaderUserId - 增强版本：尝试多种来源
			let LeaderUserId = '';
			// 1. 优先从URL参数获取
			if (option && option.LeaderUserId) {
				LeaderUserId = option.LeaderUserId;
				storageUtil.saveStorageData('LeaderUserId', LeaderUserId);
			} 
			// 2. 如果没有从URL获取到，尝试从本地存储获取
			else {
				LeaderUserId = storageUtil.getStorageData('LeaderUserId') || '';
			}
			this.LeaderUserId = LeaderUserId;
			console.log("onLoad: LeaderUserId", this.LeaderUserId);
			
			// 获取并保存schduleId/travelInternanyId - 增强版本
			let schduleIdValue = '';
			// 1. 优先从URL参数获取
			if(option && option.schduleId) {
				schduleIdValue = option.schduleId;
			} else if(option && option.id) {
				schduleIdValue = option.id;
			} 
			// 2. 如果没有从URL获取到，尝试从本地存储获取
			else {
				schduleIdValue = storageUtil.getStorageData('schduleId') || '';
			}
			// 保存获取到的ID
			if (schduleIdValue) {
				this.schduleId = schduleIdValue;
				this.travelInternanyId = schduleIdValue;
				storageUtil.saveStorageData('schduleId', schduleIdValue);
			}
			console.log("onLoad: schduleId/travelInternanyId", this.schduleId);
			
			// 获取并保存memberAccount - 增强版本
			let memberAccount = '';
			// 1. 优先从URL参数获取
			if (option && option.memberAccount) {
				memberAccount = option.memberAccount;
			} 
			// 2. 如果没有从URL获取到，尝试从本地存储获取
			else {
				memberAccount = storageUtil.getUserData('memberAccount') || '';
				console.log("memberAccount",memberAccount);
			}
			// 保存获取到的memberAccount
			this.memberAccount = memberAccount;
			if (memberAccount) {
				storageUtil.saveStorageData('memberAccount', memberAccount);
			}
			console.log("onLoad: memberAccount", this.memberAccount);
			
			// 处理分享进入情况 - 增强版本：更宽松的条件，确保分享页面能加载数据
			if (isShare) {
				console.log("通过分享链接进入，准备获取领队信息");
				// 尝试使用任何可用的LeaderUserId来源
				const leaderUserIdToUse = this.LeaderUserId || storageUtil.getStorageData('LeaderUserId') || '';
				if (leaderUserIdToUse) {
					console.log("onLoad: 分享页面使用leaderUserId", leaderUserIdToUse);
					this.GetDetailInfo(leaderUserIdToUse);
					this.checkIndex(0);
				} else {
					console.warn("onLoad: 分享页面但没有有效的LeaderUserId");
					// 即使没有LeaderUserId，也尝试加载列表，可能API会处理
					this.getPageList('onPullDownRefresh');
				}
			} else if (option && option.param) {
				// 处理普通进入方式
				try {
					let params = JSON.parse(decodeURIComponent(option.param));
					let userId = params.data.userId;
					this.Data = params.data;
					this.travelInternanyId = params.data.id;
					this.GetDetailInfo(userId);
					this.checkIndex(0);
				} catch(e) {
					console.error("解析参数失败", e);
					// 尝试使用本地存储的参数
					const storedLeaderUserId = storageUtil.getStorageData('LeaderUserId') || '';
					if (storedLeaderUserId) {
						this.GetDetailInfo(storedLeaderUserId);
						this.checkIndex(0);
					}
				}
			} else {
				// 如果不是分享进入，尝试从登录信息获取
				let loginInfo = storageUtil.getUserData('loginInfo');
				if (loginInfo && loginInfo.leaderId) {
					this.LeaderUserId = loginInfo.leaderId;
					storageUtil.saveStorageData('LeaderUserId', loginInfo.leaderId);
					this.GetDetailInfo(this.LeaderUserId);
					this.checkIndex(0);
				} else if (this.LeaderUserId) {
					// 如果没有登录信息但有本地存储的LeaderUserId，也尝试获取
					this.GetDetailInfo(this.LeaderUserId);
					this.checkIndex(0);
				}
			}
			
			// 添加页面加载完成的提示，帮助调试
			console.log("onLoad: 页面加载完成，当前状态", {
				isShare: this.isShare,
				LeaderUserId: this.LeaderUserId,
				schduleId: this.schduleId,
				memberAccount: this.memberAccount
			});
			
			// 增加额外的兜底逻辑：如果是分享页面且500ms后仍没有数据，再次尝试加载
			if (isShare) {
				setTimeout(() => {
					if (!this.leaderUserInfo || !this.leaderUserInfo.id || this.List.length === 0) {
						console.log("onLoad: 分享页面数据加载延迟，再次尝试加载");
						const leaderUserIdToUse = this.LeaderUserId || storageUtil.getStorageData('LeaderUserId') || '';
						if (leaderUserIdToUse) {
							this.GetDetailInfo(leaderUserIdToUse);
						}
					}
				}, 500);
			}
		},
		onShareAppMessage() {
				// 使用getStorageData而不是getUserData，因为在onLoad中使用的是saveStorageData存储
				const memberAccount = storageUtil.getUserData('memberAccount') || '';
				console.log("memberAccount",memberAccount);
				// 获取leaderUserId，优先从leaderUserInfo中获取，其次从当前数据中获取
				const leaderUserId = this.leaderUserInfo && this.leaderUserInfo.id ? this.leaderUserInfo.id : this.LeaderUserId;
				// 获取行程ID，优先使用travelInternanyId
				const travelId = this.travelInternanyId || this.schduleId || '';
				
				let path = `/pages/schdule/ld_schdule?share=true&schduleId=${travelId}&LeaderUserId=${leaderUserId}&memberAccount=${memberAccount}`;
				console.log("onShareAppMessage: 分享路径", path);
				
				// 确保imageUrl存在
				const imageUrl = (this.leaderUserInfo && this.leaderUserInfo.headerPic ? this.leaderUserInfo.headerPic : 
				                'https://green-leader.oss-cn-hangzhou.aliyuncs.com/common/%E5%8F%8B%E6%AD%A5%E9%A2%86%E9%98%9Flogo.png');
				console.log("onShareAppMessage: 分享图片", imageUrl);
				 
				return {
					title: `领队：${this.leaderUserInfo.nickName}`,
					path: path,
					imageUrl: imageUrl
				};
			},
		onShareTimeline() {
				// 使用getStorageData而不是getUserData，因为在onLoad中使用的是saveStorageData存储
				const memberAccount = storageUtil.getUserData('memberAccount') || '';
				// 获取leaderUserId，优先从leaderUserInfo中获取，其次从当前数据中获取
				const leaderUserId = this.leaderUserInfo && this.leaderUserInfo.id ? this.leaderUserInfo.id : this.LeaderUserId;
				// 获取行程ID，优先使用travelInternanyId
				const travelId = this.travelInternanyId || this.schduleId || '';
				
				let path = `/pages/schdule/ld_schdule?share=true&schduleId=${travelId}&LeaderUserId=${leaderUserId}&memberAccount=${memberAccount}`;
				console.log("onShareTimeline: 分享路径", path);
				
				// 确保imageUrl存在
				const imageUrl = (this.leaderUserInfo && this.leaderUserInfo.headerPic ? this.leaderUserInfo.headerPic : 
				                'https://green-leader.oss-cn-hangzhou.aliyuncs.com/common/%E5%8F%8B%E6%AD%A5%E9%A2%86%E9%98%9Flogo.png');
				console.log("onShareTimeline: 分享图片", imageUrl);
				 
				return {
					title: `领队：${this.leaderUserInfo.nickName}`,
					path: path,
					imageUrl: imageUrl
				};
			},
		methods: {
			back(){
				uni.navigateBack();
			},
			backHome(){
				uni.switchTab({
					url:'/pages/index/index',
					success() {
						var page = getCurrentPages().pop();
						if (page == undefined || page == null) return;
						page.onLoad();
					}
				})
			},
			navgetTo(page, param, type) {
				if (param != undefined) {
					type = type || '';
					let data = {
						data: param,
						page: type
					}
					uni.navigateTo({
						url: "/" + page + "?param=" + encodeURI(JSON.stringify(data)),
					});
				} else {
					uni.navigateTo({
						url: "/" + page,
					});
				}
			},
			GetDetailInfo(ID) {
				let _this = this;
				// 检查ID是否有效
				if (!ID) {
					console.error("GetDetailInfo: ID is empty");
					// 尝试从其他地方获取leaderUserId
					const storedLeaderUserId = storageUtil.getStorageData('LeaderUserId') || '';
					if (storedLeaderUserId) {
						console.log("GetDetailInfo: 使用本地存储的leaderUserId", storedLeaderUserId);
						_this.GetDetailInfo(storedLeaderUserId);
					} else if (_this.LeaderUserId) {
						console.log("GetDetailInfo: 使用当前保存的LeaderUserId", _this.LeaderUserId);
						_this.GetDetailInfo(_this.LeaderUserId);
					} else {
						console.error("GetDetailInfo: 无法获取有效的leaderUserId");
						// 如果是分享页面，显示错误提示
						if (_this.isShare) {
							uni.showToast({
								title: '无法获取行程信息',
								icon: 'none',
								duration: 2000
							});
						}
					}
					return;
				}
				console.log("GetDetailInfo: 请求领队信息", {leaderUserId: ID});
				api.leaderInfo({
					params: {
						leaderUserId: ID,
					}
				}).then(res => {
					console.log("GetDetailInfo: 返回结果", res);
					if (res.code === 0 && res.data) {
						_this.leaderUserInfo = res.data;
						// 确保leaderUserId存在
						if (!_this.leaderUserInfo.id) {
							_this.leaderUserInfo.id = ID;
						}
						// 将关键数据保存到本地存储，确保分享页面下次能正确加载
						storageUtil.saveStorageData('schduleId', _this.schduleId || '');
						storageUtil.saveStorageData('LeaderUserId', ID);
						storageUtil.saveStorageData('memberAccount', _this.memberAccount || '');
						this.getPageList('onPullDownRefresh');
					} else {
						console.error("获取领队信息失败", res.message || '未知错误');
						uni.showToast({
							title: res.message || '获取领队信息失败',
							icon: 'none',
							duration: 2000
						});
						// 如果是分享页面加载失败，尝试使用备用方式
						if (_this.isShare) {
							console.log('GetDetailInfo: 分享页面加载失败，尝试使用备用参数');
							// 设置全局标记，以便后续尝试其他方式
							getApp().globalData.shareLoadFailed = true;
						}
					}
				}).catch(function(err){
					console.error("获取领队信息异常", err);
					uni.showToast({
						title: '网络异常，请稍后重试',
						icon: 'none',
						duration: 2000
					});
					// 如果是分享页面网络异常，设置标记以便后续重试
					if (_this.isShare) {
						getApp().globalData.shareLoadFailed = true;
					}
				})
			},
			onRefresh() {  // 下拉刷新
				this.isRefreshing = true;
				this.param.page = 1;
				this.getPageList('onPullDownRefresh');
			},
			onLoadMore() {  // 上拉加载
				if (this.isLoading) return;
				this.isLoading = true;
				this.param.page = (this.param.page + 1);
				if (this.param.page > this.param.PageCount) {
					this.isLoading = true;
					this.loadMoreText = "--到底啦--"
					return;
				}
				this.getPageList('onReachBottom');
			},
			checkIndex(index) {
				console.log("checkIndex: 切换标签页", index);
				this.navIndex = index;
				this.List = [];
				this.param.page = 1;
				// 确保有有效的leaderUserId才调用getPageList
				if (this.leaderUserInfo && this.leaderUserInfo.id) {
					console.log("checkIndex: 开始加载数据");
					this.getPageList('onPullDownRefresh');
				} else {
					console.warn("checkIndex: 没有有效的leaderUserInfo.id");
					// 尝试重新获取leaderUserId
					const storedLeaderUserId = storageUtil.getStorageData('LeaderUserId') || '';
					if (storedLeaderUserId) {
						console.log("checkIndex: 尝试使用本地存储的leaderUserId", storedLeaderUserId);
						this.GetDetailInfo(storedLeaderUserId);
					} else {
						console.error("checkIndex: 无法获取有效的leaderUserId");
					}
				}
			},
			// 获取分页列表
			getPageList(type) {
				let _this = this;
				// 设置加载状态
				_this.isLoading = type === 'onReachBottom' ? true : false;
				
				// 检查leaderUserId是否有效
				const leaderUserId = _this.leaderUserInfo && _this.leaderUserInfo.id ? _this.leaderUserInfo.id : '';
				if (!leaderUserId) {
					console.error("getPageList: leaderUserId is empty");
					// 尝试从其他地方获取leaderUserId
					const storedLeaderUserId = storageUtil.getStorageData('LeaderUserId') || '';
					const currentLeaderUserId = _this.LeaderUserId;
					
					// 日志记录当前尝试的所有可能的ID来源
					console.log("getPageList: 尝试获取leaderUserId的来源", {
						"本地存储": storedLeaderUserId,
						"当前数据": currentLeaderUserId,
						"是否分享页面": _this.isShare
					});
					
					// 优先使用本地存储的ID，其次使用当前保存的ID
					const idToUse = storedLeaderUserId || currentLeaderUserId;
					if (idToUse) {
						console.log("getPageList: 使用可用的leaderUserId", idToUse);
						// 先获取leader信息，然后在回调中加载列表
						_this.GetDetailInfo(idToUse);
					} else {
						console.error("getPageList: 无法获取有效的leaderUserId");
						_this.isRefreshing = false;
						_this.isLoading = false;
						_this.loadMoreText = "";
						// 如果是分享页面，显示错误提示
						if (_this.isShare) {
							uni.showToast({
								title: '无法获取行程数据',
								icon: 'none',
								duration: 2000
							});
						}
					}
					return;
				}
				
				console.log("getPageList: 请求行程列表", {leaderUserId: leaderUserId, page: _this.param.page, type: type});
				let requestData = {
					params: {
						page: _this.param.page, //当前页
						size: _this.param.limit, //每页显示记录数
						leaderUserId: leaderUserId,
						id: _this.schduleId || _this.travelInternanyId || '', // 增加id参数
					}
				}
				api.leaderItineraryList(requestData).then(res => {
					console.log("getPageList: 返回结果", res);
					if (res.code === 0) {
						// 处理可能的数据结构变化
						const items = res.data && res.data.items ? res.data.items : res.data || [];
						if (items.length > 0) {
							let pagelist = items;
							// 确保total存在才计算总页数
							const totalCount = res.data && res.data.total ? res.data.total : pagelist.length;
							_this.param.PageCount = Math.ceil(totalCount / _this.param.limit);
							if (type == "onReachBottom") {
								_this.List = _this.List.concat(pagelist)
							} else {
								_this.List = pagelist;
							}
							console.log("行程列表数据加载成功", {total: _this.List.length});
							// 确保每个列表项的coverUrl存在
							_this.List = _this.List.map(item => ({
								...item,
								coverUrl: item.coverUrl || 'https://green-leader.oss-cn-hangzhou.aliyuncs.com/common/%E5%8F%8B%E6%AD%A5%E9%A2%86%E9%98%9Flogo.png'
							}));
						} else {
							console.log("行程列表为空");
							// 即使列表为空，也显示一个友好的提示
							if(type == "onPullDownRefresh"){
								_this.List = [];
								uni.showToast({
									title: '暂无行程数据',
									icon: 'none',
									duration: 1500
								});
							} else if(type == "onReachBottom"){
								this.loadMoreText = "--到底啦--"
							}
						}
					} else {
						console.error("获取行程列表失败", res.message || '未知错误');
						// 显示错误提示
						uni.showToast({
							title: res.message || '获取行程数据失败',
							icon: 'none',
							duration: 2000
						});
					}
				}).catch(function(err){
					console.error("获取行程列表异常", err);
					// 显示网络错误提示
					uni.showToast({
						title: '网络异常，请稍后重试',
						icon: 'none',
						duration: 2000
					});
				}).finally(function(){
					// 无论成功失败都设置加载状态为false
					_this.isRefreshing = false;
					_this.isLoading = false;
					_this.loadMoreText = "";
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.container{
		background-color: #e8e8e8;
	}
	.my-header {
		background-color: #fff;
	}
	
	.circle-one {
		width: 520rpx;
		height: 520rpx;
		border-radius: 50%;
		background-image: linear-gradient(to right bottom, #eff5e3 60%, #eff5e3 80%);
		position: absolute;
		z-index: 1;
		top: -100rpx;
		left: -90rpx;
	}
	
	.is-flex {
		display: flex;
	}
	
	/* 用户信息区域 */
	.avatar {
		width: 278rpx;
		height: 278rpx;
		text-align: right;
		padding-right: 40rpx;
		image {
			width: 278rpx;
			height: 278rpx;
			object-fit: cover;
			border-radius: 50%;
		}
	}
	
	.sign-status{
		font-size: 26rpx;
		// color: #888;
		border: 1px solid #888;
		border-radius: 10rpx;
		padding: 0 15rpx;
	}
	.sign-status.uni-success{
		color: $uni-text-color-green;
		border: 1px solid $uni-text-color-green;
		height: 50rpx;
		line-height: 50rpx;
	}
	
	.cus-nav-bar {
		position: sticky;
		z-index: 66;
		top: 0;
		flex-direction: row;
		height: calc(44px + env(safe-area-inset-top));
		line-height: calc(44px + env(safe-area-inset-top));
		padding: 15rpx 20rpx;
		color: #000;
		display: flex;
	
	}
	.cus-nav-left {
		width: 120rpx;
		position: relative;
		z-index: 77;
	}
	.cus-nav-title {
		text-align: center;
		margin-left: -120rpx;
		flex-grow: 1;
		font-size: 32rpx;
	}
	
	.avatar {
		display: flex;
		align-items: center;
	}
	
	.avatar-left {
		position: relative;
		z-index: 99;
		width: 65%;
		text-align: center;
	
		text {
			font-size: 36rpx;
			font-weight: bold;
			color: $uni-text-color-black;
	
		}
	}
	
	.avatar-right {
		width: 35%;
		text-align: right;
		padding-right: 50rpx;
	
		image {
			width: 278rpx;
			height: 278rpx;
			border-radius: 50%;
		}
	}
	
	.gender{
		position: relative;
	}

	.gender-icon {
		position: absolute;
		right: -30rpx;
		top: -12rpx;
	}

	.uni-flex {
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.uni-row {
		flex-direction: row;
	}

	.flex-item {
		width: 50%;
		text-align: left;
		line-height: 80rpx;
	}

	.is-flex {
		display: flex;
	}

	.cus-nav-bar {
		position: sticky;
		top: 0;
		flex-direction: row;
		height: calc(44px + env(safe-area-inset-top));
		line-height: calc(44px + env(safe-area-inset-top));
		padding: 15rpx 20rpx;
		color: $uni-text-color-black;
		display: flex;

	}

	.cus-nav-left {
		width: 120rpx;
	}

	.cus-nav-title {
		text-align: center;
		flex-grow: 1;
		font-size: 32rpx;
	}

	.cus-nav-right {
		width: 120rpx;
	}
	.p-intro{
		position: relative;
		z-index: 66;
		color: $uni-text-color-black;
		.flex-item{
			width: 35%;
			text{
				display: flex;
			}
		}
		.flex-item:last-child{
			width: 30%;
			image{
				width: 210rpx;
				height: 210rpx;
				object-fit: cover;
				border-radius: 50%;
			}
		}
	}
		
	.foot-list {
		width: 100%;
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		row-gap: 2%;
	}

	.foot-card {
		width: 47%;
		// height: 390rpx;
		background-color: #fff;
		border-radius: 20rpx;
		position: relative;
		margin-bottom: 30rpx;
		box-shadow: 2rpx 2rpx 10rpx $uni-text-color-grey8;
	}

	.foot-avatar {
		width: 100%;
		height: 425rpx;
		border-top-right-radius: 20rpx;
		border-top-left-radius: 20rpx;
	}
	
	::v-deep button{
		border: initial;
		background-color: transparent;
		height: 86rpx;
	}
	::v-deep button:after{
		border: inherit;
		background-color: transparent;
	}
	::v-deep button text{
		font-size: 28rpx;
	}

	.foot-name {
		font-size: 28rpx;
		color: #000;
	}

	.sign-num {
		font-size: 26rpx;
		color: $uni-text-color-grey8;
	}

	.sign-price-list {
		font-size: 26rpx;
		color: $uni-text-color-grey8;
	}

	.sign-price {
		color: $uni-text-color-red;
	}

	.sign-time {
		position: absolute;
		top: 10rpx;
		width: 98%;
		left: 0;
		right: 0;
		margin: auto;
		background-color: rgba(0, 0, 0, 0.6);
		height: 45rpx;
		color: #fff;
		font-size: 24rpx;
		border-radius: 20rpx;
		padding: 0 10rpx;
		box-sizing: border-box;
	}
</style>